#include <iostream>
#include <algorithm>
#include <vector>
#include <stdio.h>
using namespace std;

bool myfunction (int i,int j) { return (i<j); }

struct myclass {
  bool operator() (int i,int j) { return (i<j);}
} myobject;


int main ()
{
  int n;
  vector <int> lista;
  cout<<"Introduzca numeros";
  do
  {
      n=getchar();
      if(n!=10)
      {
          n=n-48;
          lista.push_back(n);
      }
  }
  while (n!=10);
  vector<int>::iterator it;

  sort (lista.begin(), lista.end(), myobject);
  cout << "Lista ordenada:";
  for (it=lista.begin(); it!=lista.end(); ++it)
    cout << " " << *it;

  cout << endl;

  return 0;
}
